def insert_sort(li):
    n = len(li)
    for i in range(1,n):
        for j in range(i,0,-1):
            if li[j] < li[j-1]:
                li[j],li[j-1] = li[j-1],li[j]
li = [1,33,23,12,44,5,22,31]
insert_sort(li)
for tem in li:
    print(tem)